<?php
/**
 * ===============================================
 * 版权所有 2019-2050 青岛铁锤科技有限公司，并保留所有权利。
 * 网站地址: http://www.huaxianling.com
 * ===============================================
 * Author: Alex
 * Created Time: 2019/6/29 9:55
 * Modified Time: 2019/6/29 9:55
 * Version: 2.0
 */
namespace App\Modules\System\Controllers;
use Flower\Core\Http\BaseController;
use Flower\WeChatAuth\Exceptions\AuthApiException as WxAuthApiException;
class AuthController extends BaseController
{
    /**
     * 微信登录
     */
    public function WxLogin()
    {
        try{
            return auth("wx")->attempt();
        }
        catch (WxAuthApiException $ex){
           return $this->error($ex->getMessage(),$ex->getCode());
        }
    }


//    public function touristLogin(){
//	    try{
//		    return auth("wx")->attemptForTourist();
//	    }
//	    catch (WxAuthApiException $ex){
//		    return $this->error($ex->getMessage(),$ex->getCode());
//	    }
//    }
}